const fs = require('fs');
const a = [
    "Device Name:",
    "Device ID:",
    "Equipment Model:",
    "Receive Alarm Time:",
    "Alarm Reception Equipment:",
    "End Time:",
    "Waiting For An Alarm",
    "No Alarm Is Received, Automatically Shut Down",
    "Address",
    "Alarm Information",
    "Alarm Type",
    "Jurisdiction Unit",
    "Location",
    "State",
    "Unable To Handle The Alarm",
    "You Are Not A Police Officer And Cannot Handle The Order",
    "Closure",
    "Receive Alarm Information",
    "Alarm Sheet Recording",
    "Automatic Recording Of Alarm Response",
    "Open",
    "The Video Call Process Will Be Automatically Recorded And A File Will Be Generated When Receiving An Alarm.",
    "Class",
    "Confirm",
    "Clear",
    "Batch Setup",
    "Selected Person:",
    "Personnel",
    "Alarm Priority",
    "When Alarming, The System Will Be Assigned To High-priority Personnel (level 1 Highest). If You Are Busy, It Will Be Postponed To The Next Priority. Please Select The Appropriate Level Based On Your Responsibilities And Response Capabilities.",
    "Alarm Time:",
    "Batch Modification Priority",
    "Platform Police Order",
    "Gateway Police List",
    "Modification Priority",
    "Edit",
    "Device Name",
    "Receive Alarm Time",
]
let b = ''
a.forEach((originalStr) => {
  const convertedStr = originalStr
      .replace(/[^a-zA-Z]/g, '') // 移除非字母字符
      .replace(/^[A-Z]/, (match) => match.toLowerCase()) // 首字母转小写
  b += `
  ${convertedStr}`
})

fs.writeFile('./text.js', `${b}`, 'utf8', (err) => {
  if (err) {
    console.error(err);
    return;
  }
  // console.log('执行成功')
});
